//
//  BaseViewController.m
//  视图控制器的生命周期
//
//  Created by 伍银荣 on 2021/6/23.
//  Copyright © 2021 com.example. All rights reserved.
//

#import "BaseViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

-(void)loadView {
    [super loadView];
    NSLog(@"加载视图----%@",[self class]);
}

- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"视图加载完成----%@",[self class]);
}

-(void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    NSLog(@"视图即将显示----%@",[self class]);
}

-(void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    NSLog(@"视图已经显示---%@",[self class]);
}

-(void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    NSLog(@"视图即将消失---%@",[self class]);
}

-(void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    NSLog(@"视图已经消失----%@",[self class]);
}

-(void)dealloc {
    //[super dealloc];  //arc下禁止使用这个方法
    NSLog(@"视图已经销毁---%@",[self class]);
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
